package com.xk.school_device.common;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @Title: PageEntity
 * @Author xk
 * @Package com.xk.school_device.entity
 * @Date 2025/4/24 11:30
 * @description: 通用分页实体类
 */
@Data
public class PageEntity<T> {

    private static final int DEFAULT_PAGE_SIZE = 10; // 默认每页大小
    private static final int DEFAULT_CURRENT_PAGE = 1; // 默认当前页

    @TableField(exist = false)
    private int current = DEFAULT_CURRENT_PAGE; // 当前页
    @TableField(exist = false)
    private int size = DEFAULT_PAGE_SIZE; // 每页大小
    @TableField(exist = false)
    private int total = 0; // 总记录数

}
